<?php 
class salarie_controller
{
    function create_salarie($id_societe,$name,$firstname,$phone,$salaire)
    {
        $db1 = new database;
        $db1->insert("salarie","id_societe","nom","prenom","telephone","salaire",$id_societe,$name,$firstname,$phone,$salaire);
    }
    
    function liste_salarie($table,$id)
    {
       $db1 = new database;
       $resultat = $db1->select($table, $id);
       
       while($row = mysql_fetch_array($resultat))
       {
         $array[] = $row['nom']." ".$row['prenom'];   
       }
       return $array;
    }
}

?>
